Skip to content

Conversation

escapedcat
Copy link
Member

@escapedcat escapedcat commented Jun 25, 2023

This fails.

Debugged a bit. Changing the cosmicconfig searchPlaces to this makes it work again:

	const explorer = cosmiconfig(moduleName, {
		searchPlaces: [
			// cosmiconfig overrides default searchPlaces if any new search place is added (For e.g. `*.ts` files),
			// we need to manually merge default searchPlaces from https://github.com/davidtheclark/cosmiconfig#searchplaces
			'package.json',
			// `.${moduleName}rc`,
			// `.${moduleName}rc.json`,
			// `.${moduleName}rc.yaml`,
			// `.${moduleName}rc.yml`,
			// `.${moduleName}rc.js`,
			// `.${moduleName}rc.cjs`,
			// `${moduleName}.config.js`,
			// `${moduleName}.config.cjs`,

			// files supported by TypescriptLoader
			`.${moduleName}rc.ts`,
			`.${moduleName}rc.cts`,
			`${moduleName}.config.ts`,
			`${moduleName}.config.cts`,
		],
		loaders: {
			'.ts': tsLoader,
			'.cts': tsLoader,
		},
	});

Wondering why even just add ${moduleName}.config.js again breaks this. These are mostly defaults anyways.

@escapedcat escapedcat changed the title chore: update cosmicconfig chore: update cosmicconfig to v8.20 Aug 9, 2023
@escapedcat
Copy link
Member Author

Wanna re-open this one which could be merged when we remove node v14 support?
For context see #3641

@escapedcat escapedcat force-pushed the chore/deps--cosmicconfig branch from 7879abf to e942063 Compare August 19, 2023 10:05
@escapedcat escapedcat closed this Oct 20, 2023
@escapedcat escapedcat deleted the chore/deps--cosmicconfig branch August 30, 2024 04:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

1 participant